// components/tag/index.js
import {
  distance
} from '../../utils/util'
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    tabIndex: {
      type: Number
    },
    lat: {
      type: String
    },
    lng: {
      type: String
    },
    look: {
      type: Number,
      value: 0
    },
    distance: {
      type: Number,
      value: 0
    }
  },
  lifetimes: {
    ready() {
      this.init()
    },
    hide() {
      this.setData({
        distance: 0
      })
    }
  },
  /**
   * 组件的初始数据
   */
  data: {
    distance: 0,
    attestation: 1
  },

  /**
   * 组件的方法列表
   */
  methods: {
    init() {
      console.log(wx.getStorageSync('userInfo'))
      const attestation = wx.getStorageSync('userInfo').entisauth
      this.setData({
        attestation
      })
    }
  }
})